function SrvApiClient(params){ 
	 
}

SrvApiClient.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new SrvApiClient.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new SrvApiClient.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new SrvApiClient.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	
	
	/** 编号 [非空]       **/
	this.sacId=function(sacId){if(this.proxy)return this.getProxy().sacId(sacId);  this.put("sacId", sacId);return this;};
	/** and sac_id is null */
	this.sacIdNull=function(){if(this.proxy)return this.getProxy().sacIdNull();if(this.get("sacIdNot")==null)this.put("sacIdNot", "");this.put("sacId", null);return this;};
	/** not .... */
	this.sacIdNot=function(){if(this.proxy)return this.getProxy().sacIdNot();this.put("sacIdNot", "not");return this;};
	this.sacIdNotNull=function(){if(this.proxy)return this.getProxy().sacIdNotNull();this.put("sacIdNot", "not");this.put("sacId", null);return this;};
	this.sacIdNot=function(sacId){if(this.proxy)return this.getProxy().sacIdNot(sacId);this.put("sacIdNot", "not");this.put("sacId", sacId);return this;};
		
	/** and sac_id <= ? */
	this.sacIdMin=function(min){if(this.proxy)return this.getProxy().sacIdMin(min);this.put("sacIdMin", min);return this;};
	/** and sac_id >= ? */
	this.sacIdMax=function(max){if(this.proxy)return this.getProxy().sacIdMax(max);this.put("sacIdMax", max);return this;};
		
		
	this.sacIdIn=function(ids){
		if(this.proxy)return this.getProxy().sacIdIn(ids);  this.put("sacIdIn", ids);return this;
	};	
		 
	
	
	/** 客户端ID [非空]       **/
	this.sacClient=function(sacClient){if(this.proxy)return this.getProxy().sacClient(sacClient);  this.put("sacClient", sacClient);return this;};
	/** and sac_client is null */
	this.sacClientNull=function(){if(this.proxy)return this.getProxy().sacClientNull();if(this.get("sacClientNot")==null)this.put("sacClientNot", "");this.put("sacClient", null);return this;};
	/** not .... */
	this.sacClientNot=function(){if(this.proxy)return this.getProxy().sacClientNot();this.put("sacClientNot", "not");return this;};
	this.sacClientNotNull=function(){if(this.proxy)return this.getProxy().sacClientNotNull();this.put("sacClientNot", "not");this.put("sacClient", null);return this;};
	this.sacClientNot=function(sacClient){if(this.proxy)return this.getProxy().sacClientNot(sacClient);this.put("sacClientNot", "not");this.put("sacClient", sacClient);return this;};
		
		 
	
	
	/** 客户密钥 [非空]       **/
	this.sacSecret=function(sacSecret){if(this.proxy)return this.getProxy().sacSecret(sacSecret);  this.put("sacSecret", sacSecret);return this;};
	/** and sac_secret is null */
	this.sacSecretNull=function(){if(this.proxy)return this.getProxy().sacSecretNull();if(this.get("sacSecretNot")==null)this.put("sacSecretNot", "");this.put("sacSecret", null);return this;};
	/** not .... */
	this.sacSecretNot=function(){if(this.proxy)return this.getProxy().sacSecretNot();this.put("sacSecretNot", "not");return this;};
	this.sacSecretNotNull=function(){if(this.proxy)return this.getProxy().sacSecretNotNull();this.put("sacSecretNot", "not");this.put("sacSecret", null);return this;};
	this.sacSecretNot=function(sacSecret){if(this.proxy)return this.getProxy().sacSecretNot(sacSecret);this.put("sacSecretNot", "not");this.put("sacSecret", sacSecret);return this;};
		
		 
	
	
	/** 访问类型 [非空]   0:配置接口 1:全量模型     **/
	this.sacType=function(sacType){if(this.proxy)return this.getProxy().sacType(sacType);  this.put("sacType", sacType);return this;};
	/** and sac_type is null */
	this.sacTypeNull=function(){if(this.proxy)return this.getProxy().sacTypeNull();if(this.get("sacTypeNot")==null)this.put("sacTypeNot", "");this.put("sacType", null);return this;};
	/** not .... */
	this.sacTypeNot=function(){if(this.proxy)return this.getProxy().sacTypeNot();this.put("sacTypeNot", "not");return this;};
	this.sacTypeNotNull=function(){if(this.proxy)return this.getProxy().sacTypeNotNull();this.put("sacTypeNot", "not");this.put("sacType", null);return this;};
	this.sacTypeNot=function(sacType){if(this.proxy)return this.getProxy().sacTypeNot(sacType);this.put("sacTypeNot", "not");this.put("sacType", sacType);return this;};
		
		
	this.sacTypeIn=function(ids){
		if(this.proxy)return this.getProxy().sacTypeIn(ids);  this.put("sacTypeIn", ids);return this;
	};	
		 
	
	
	/** 回调地址        **/
	this.sacUrl=function(sacUrl){if(this.proxy)return this.getProxy().sacUrl(sacUrl);  this.put("sacUrl", sacUrl);return this;};
	/** and sac_url is null */
	this.sacUrlNull=function(){if(this.proxy)return this.getProxy().sacUrlNull();if(this.get("sacUrlNot")==null)this.put("sacUrlNot", "");this.put("sacUrl", null);return this;};
	/** not .... */
	this.sacUrlNot=function(){if(this.proxy)return this.getProxy().sacUrlNot();this.put("sacUrlNot", "not");return this;};
	this.sacUrlNotNull=function(){if(this.proxy)return this.getProxy().sacUrlNotNull();this.put("sacUrlNot", "not");this.put("sacUrl", null);return this;};
	this.sacUrlNot=function(sacUrl){if(this.proxy)return this.getProxy().sacUrlNot(sacUrl);this.put("sacUrlNot", "not");this.put("sacUrl", sacUrl);return this;};
		
		 
	
	
	/** 描述        **/
	this.sacDesc=function(sacDesc){if(this.proxy)return this.getProxy().sacDesc(sacDesc);  this.put("sacDesc", sacDesc);return this;};
	/** and sac_desc is null */
	this.sacDescNull=function(){if(this.proxy)return this.getProxy().sacDescNull();if(this.get("sacDescNot")==null)this.put("sacDescNot", "");this.put("sacDesc", null);return this;};
	/** not .... */
	this.sacDescNot=function(){if(this.proxy)return this.getProxy().sacDescNot();this.put("sacDescNot", "not");return this;};
	this.sacDescNotNull=function(){if(this.proxy)return this.getProxy().sacDescNotNull();this.put("sacDescNot", "not");this.put("sacDesc", null);return this;};
	this.sacDescNot=function(sacDesc){if(this.proxy)return this.getProxy().sacDescNot(sacDesc);this.put("sacDescNot", "not");this.put("sacDesc", sacDesc);return this;};
		
		 
	
	
	/** 修改时间 [非空]       **/
	this.sacUpdateTime=function(sacUpdateTime){if(this.proxy)return this.getProxy().sacUpdateTime(sacUpdateTime);  this.put("sacUpdateTime", sacUpdateTime);return this;};
	/** and sac_update_time is null */
	this.sacUpdateTimeNull=function(){if(this.proxy)return this.getProxy().sacUpdateTimeNull();if(this.get("sacUpdateTimeNot")==null)this.put("sacUpdateTimeNot", "");this.put("sacUpdateTime", null);return this;};
	/** not .... */
	this.sacUpdateTimeNot=function(){if(this.proxy)return this.getProxy().sacUpdateTimeNot();this.put("sacUpdateTimeNot", "not");return this;};
	this.sacUpdateTimeNotNull=function(){if(this.proxy)return this.getProxy().sacUpdateTimeNotNull();this.put("sacUpdateTimeNot", "not");this.put("sacUpdateTime", null);return this;};
	this.sacUpdateTimeNot=function(sacUpdateTime){if(this.proxy)return this.getProxy().sacUpdateTimeNot(sacUpdateTime);this.put("sacUpdateTimeNot", "not");this.put("sacUpdateTime", sacUpdateTime);return this;};
		
	/** and sac_update_time >= ? */
	this.sacUpdateTimeStart=function(start){if(this.proxy)return this.getProxy().sacUpdateTimeStart(start);this.put("sacUpdateTimeStart", start);return this;};			
	/** and sac_update_time <= ? */
	this.sacUpdateTimeEnd=function(end){if(this.proxy)return this.getProxy().sacUpdateTimeEnd(end);this.put("sacUpdateTimeEnd", end);return this;};
		
		 
	
	
	/** 添加时间 [非空]       **/
	this.sacAddTime=function(sacAddTime){if(this.proxy)return this.getProxy().sacAddTime(sacAddTime);  this.put("sacAddTime", sacAddTime);return this;};
	/** and sac_add_time is null */
	this.sacAddTimeNull=function(){if(this.proxy)return this.getProxy().sacAddTimeNull();if(this.get("sacAddTimeNot")==null)this.put("sacAddTimeNot", "");this.put("sacAddTime", null);return this;};
	/** not .... */
	this.sacAddTimeNot=function(){if(this.proxy)return this.getProxy().sacAddTimeNot();this.put("sacAddTimeNot", "not");return this;};
	this.sacAddTimeNotNull=function(){if(this.proxy)return this.getProxy().sacAddTimeNotNull();this.put("sacAddTimeNot", "not");this.put("sacAddTime", null);return this;};
	this.sacAddTimeNot=function(sacAddTime){if(this.proxy)return this.getProxy().sacAddTimeNot(sacAddTime);this.put("sacAddTimeNot", "not");this.put("sacAddTime", sacAddTime);return this;};
		
	/** and sac_add_time >= ? */
	this.sacAddTimeStart=function(start){if(this.proxy)return this.getProxy().sacAddTimeStart(start);this.put("sacAddTimeStart", start);return this;};			
	/** and sac_add_time <= ? */
	this.sacAddTimeEnd=function(end){if(this.proxy)return this.getProxy().sacAddTimeEnd(end);this.put("sacAddTimeEnd", end);return this;};
		
		 
	
	
	/** 状态 [非空]   1:正常 0:无效     **/
	this.sacStatus=function(sacStatus){if(this.proxy)return this.getProxy().sacStatus(sacStatus);  this.put("sacStatus", sacStatus);return this;};
	/** and sac_status is null */
	this.sacStatusNull=function(){if(this.proxy)return this.getProxy().sacStatusNull();if(this.get("sacStatusNot")==null)this.put("sacStatusNot", "");this.put("sacStatus", null);return this;};
	/** not .... */
	this.sacStatusNot=function(){if(this.proxy)return this.getProxy().sacStatusNot();this.put("sacStatusNot", "not");return this;};
	this.sacStatusNotNull=function(){if(this.proxy)return this.getProxy().sacStatusNotNull();this.put("sacStatusNot", "not");this.put("sacStatus", null);return this;};
	this.sacStatusNot=function(sacStatus){if(this.proxy)return this.getProxy().sacStatusNot(sacStatus);this.put("sacStatusNot", "not");this.put("sacStatus", sacStatus);return this;};
		
		
	this.sacStatusIn=function(ids){
		if(this.proxy)return this.getProxy().sacStatusIn(ids);  this.put("sacStatusIn", ids);return this;
	};	
		 
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有API客户端 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/api/apiclient.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取API客户端分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/api/apiclient.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取API客户端 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/api/apiclient.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

SrvApiClient.get = function(id){
	var protocol = ux.ajax("/admin/api/apiclient.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.srvApiClient;
	return null;
}

SrvApiClient.where = new SrvApiClient.Where(0,true);